<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/socket/UdpIoSocket.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_9ad1227260954e346101f3844f0abb3d.html">socket</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">UdpIoSocket.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_udp_io_socket_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __UDPIOSOCKET_H__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __UDPIOSOCKET_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_udp_socket_8h.html">./internal/UdpSocket.h</a>&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_udp_base_8h.html">./internal/UdpBase.h</a>&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;../stream/StreamByte.h&quot;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html">   18</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a> : <span class="keyword">public</span> <a class="code" href="class_c_udp_socket.html">CUdpSocket</a></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;{</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <a class="code" href="class_c_udp_io_socket.html#aaf3120cb54650f0fd1b32ff0348ec99c">delete_class_copy_operator</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>);</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a45436d2d4df633ef17ff05f874e68ec9">   23</a></span>&#160;    <a class="code" href="class_c_udp_io_socket.html#a45436d2d4df633ef17ff05f874e68ec9">CUdpIoSocket</a>() :<a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {}</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#abd7e4a7189b10be6f2d8ce1876aba4e1">   26</a></span>&#160;    <a class="code" href="class_c_udp_io_socket.html#abd7e4a7189b10be6f2d8ce1876aba4e1">CUdpIoSocket</a>(<a class="code" href="class_c_basic_service.html">CBasicService</a>* service) :<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>(service), <a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {}</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CUdpIoClass&gt;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a902acbf4c7fcff1856a4b9d35a20aa1a">   34</a></span>&#160;    <a class="code" href="class_c_udp_io_socket.html#a902acbf4c7fcff1856a4b9d35a20aa1a">CUdpIoSocket</a>(CUdpIoClass* service)</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        :<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>(service == <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a> ? <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a> : service-&gt;GetTcpServicePtr()), <a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a>(service) {}</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a124158838a4944182189ea67b590b509">   38</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="class_c_udp_io_socket.html#a124158838a4944182189ea67b590b509">~CUdpIoSocket</a>() {}</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#ifdef STD11</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <a class="code" href="class_c_udp_io_socket.html#a45436d2d4df633ef17ff05f874e68ec9">CUdpIoSocket</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp;&amp; sock) : <a class="code" href="class_c_udp_socket.html">CUdpSocket</a>(std::move(sock)) {</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        sock._ioService = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        std::swap(<a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a>, sock._ioService);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    }</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; operator= (<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp;&amp; sock) {</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <span class="keywordflow">if</span> (<span class="keyword">this</span> != &amp;sock)</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        {</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;            <a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a> = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            std::swap(<a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a>, sock._ioService);</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            *dynamic_cast&lt;CUdpSocket*&gt;(<span class="keyword">this</span>) = std::move(*dynamic_cast&lt;CUdpSocket*&gt;(&amp;sock));</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        }</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    }</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a1050e2bc438ca9b98f1662f452fc7c3b">   59</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a1050e2bc438ca9b98f1662f452fc7c3b">Swap</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock) {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        std::swap(<a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a>, sock.<a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a>);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <a class="code" href="class_c_socket.html#a816347ac8821a8288a38645702bee10e">CUdpSocket::Swap</a>(*dynamic_cast&lt;CUdpSocket*&gt;(&amp;sock));</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    }</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CUdpIoClass&gt;</div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a7e72aa11797b8dbbb81961d26e6ef6fb">   70</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a7e72aa11797b8dbbb81961d26e6ef6fb">SetIoService</a>(CUdpIoClass* service) {</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a> = service;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        this-&gt;<a class="code" href="class_c_socket.html#ad08fc2df680d1fd84035f5aada97dd3a">SetService</a>(service-&gt;GetTcpServicePtr());</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CUdpIoClass&gt;</div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#aca6d749efd4b59c45d65348b7b1beb12">   80</a></span>&#160;    CUdpIoClass* <a class="code" href="class_c_udp_io_socket.html#aca6d749efd4b59c45d65348b7b1beb12">GetIoService</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (CUdpIoClass*)<a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a>; }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#acae8d9bce3697d423126f750fa647902">   89</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#acae8d9bce3697d423126f750fa647902">AsyncConnect</a>(Func func) {</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncConnect(*<span class="keyword">this</span>, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ConnectHandleNull&lt;Func&gt;(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    }</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a005c8b65bab36ba79d725a25a2d073d0">   95</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a005c8b65bab36ba79d725a25a2d073d0">AsyncConnect</a>(Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncConnect(*<span class="keyword">this</span>, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ConnectHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    }</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#ac6f4dd15dd18b78935d7f72e8d0a564e">  102</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#ac6f4dd15dd18b78935d7f72e8d0a564e">AsyncRead</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func) {</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncRead(*<span class="keyword">this</span>, buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandleNull&lt;Func&gt;(func)));</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        }</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    }</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a8428e3a20a7ab4e5b382053e3d58da15">  108</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a8428e3a20a7ab4e5b382053e3d58da15">AsyncRead</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncRead(*<span class="keyword">this</span>, buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        }</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    }</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#ad8d8a76ec387df035ac135d719848eee">  115</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#ad8d8a76ec387df035ac135d719848eee">AsyncRecvfrom</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <a class="code" href="class_c_sock_addr.html">CSockAddr</a>* addr, Func func) {</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncRecvfrom(*<span class="keyword">this</span>, buff, addr, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandleNull&lt;Func&gt;(func)));</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    }</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a473ba902e85b13ae2a2fb3ec652dbc42">  119</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a473ba902e85b13ae2a2fb3ec652dbc42">AsyncRecvfrom</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <a class="code" href="class_c_sock_addr.html">CSockAddr</a>* addr, Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncRecvfrom(*<span class="keyword">this</span>, buff, addr, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#abe8107a0a0b2c2455b99ea2de36e28d6">  124</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#abe8107a0a0b2c2455b99ea2de36e28d6">AsyncSend</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncSend(*<span class="keyword">this</span>, buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandleNull&lt;Func&gt;(func)));</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        }</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    }</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a539cae0d3b3d326fa3f9a7000ed5453b">  130</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a539cae0d3b3d326fa3f9a7000ed5453b">AsyncSend</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncSend(*<span class="keyword">this</span>, buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        }</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    }</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#af5484d759ae31b550e9abb6c443660a6">  137</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#af5484d759ae31b550e9abb6c443660a6">AsyncSendTo</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <a class="code" href="class_c_sock_addr.html">CSockAddr</a>* addr, <span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncSendTo(*<span class="keyword">this</span>, buff, addr, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandleNull&lt;Func&gt;(func)));</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    }</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a86ed4e777424a764d7e1c2a6a83b61dc">  143</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a86ed4e777424a764d7e1c2a6a83b61dc">AsyncSendTo</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <a class="code" href="class_c_sock_addr.html">CSockAddr</a>* addr, <span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncSendTo(*<span class="keyword">this</span>, buff, addr, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        }</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    }</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160; </div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CTcpIoClass, <span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#ae31952898329e696d6fdf9a1527746f8">  150</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#ae31952898329e696d6fdf9a1527746f8">Post</a>(CTcpIoClass* service, <span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <span class="keywordflow">if</span> (service != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(service-&gt;GetTcpServicePtr())-&gt;<a class="code" href="class_c_udp_io_socket.html#ae31952898329e696d6fdf9a1527746f8">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle_null.html">PostHandleNull&lt;Func&gt;</a>(func)));</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        }</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    }</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CTcpIoClass, <span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a4101da7fdef4bdf4fbebe9c1a6372aba">  156</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a4101da7fdef4bdf4fbebe9c1a6372aba">Post</a>(CTcpIoClass* service, <span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordflow">if</span> (service != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(service-&gt;GetTcpServicePtr())-&gt;<a class="code" href="class_c_udp_io_socket.html#ae31952898329e696d6fdf9a1527746f8">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle.html">PostHandle&lt;Func&gt;</a>(func)), invoker);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        }</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    }</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a52ef2a07a07c43dd0f74e3cda891c94a">  163</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a52ef2a07a07c43dd0f74e3cda891c94a">Post</a>(<a class="code" href="class_c_basic_service.html">CBasicService</a>* service, <span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keywordflow">if</span> (service != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(service)-&gt;Post(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle_null.html">PostHandleNull&lt;Func&gt;</a>(func)));</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        }</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    }</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a6bd9186855643f5b2414e073d938d01e">  169</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_socket.html#a6bd9186855643f5b2414e073d938d01e">Post</a>(<a class="code" href="class_c_basic_service.html">CBasicService</a>* service, <span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordflow">if</span> (service != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            dynamic_cast&lt;CUdpBase*&gt;(service)-&gt;Post(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle.html">PostHandle&lt;Func&gt;</a>(func)), invoker);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        }</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">  177</a></span>&#160;    <span class="keywordtype">void</span>* <a class="code" href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">_ioService</a>;   </div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;};</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160; </div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="preprocessor">#endif // __UDPIOSOCKET_H__</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_c_udp_io_socket_html_a7e72aa11797b8dbbb81961d26e6ef6fb"><div class="ttname"><a href="class_c_udp_io_socket.html#a7e72aa11797b8dbbb81961d26e6ef6fb">CUdpIoSocket::SetIoService</a></div><div class="ttdeci">void SetIoService(CUdpIoClass *service)</div><div class="ttdoc">设置服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00070">UdpIoSocket.h:70</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a0fb3f4ef44c0b4135f6bac654aa5281c"><div class="ttname"><a href="class_c_udp_io_socket.html#a0fb3f4ef44c0b4135f6bac654aa5281c">CUdpIoSocket::_ioService</a></div><div class="ttdeci">void * _ioService</div><div class="ttdoc">存储用户传递的CUdpIoClient/CUdpIoServer类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00177">UdpIoSocket.h:177</a></div></div>
<div class="ttc" id="a_udp_base_8h_html"><div class="ttname"><a href="_udp_base_8h.html">UdpBase.h</a></div></div>
<div class="ttc" id="aclass_c_stream_iteator_html"><div class="ttname"><a href="class_c_stream_iteator.html">CStreamIteator</a></div><div class="ttdef"><b>Definition:</b> <a href="_stream_byte_8h_source.html#l00011">StreamByte.h:11</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html"><div class="ttname"><a href="class_shared_ptr.html">SharedPtr&lt; HandleBase &gt;</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_abe8107a0a0b2c2455b99ea2de36e28d6"><div class="ttname"><a href="class_c_udp_io_socket.html#abe8107a0a0b2c2455b99ea2de36e28d6">CUdpIoSocket::AsyncSend</a></div><div class="ttdeci">void AsyncSend(const CStreamIteator &amp;buff, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00124">UdpIoSocket.h:124</a></div></div>
<div class="ttc" id="a_udp_socket_8h_html"><div class="ttname"><a href="_udp_socket_8h.html">UdpSocket.h</a></div></div>
<div class="ttc" id="aclass_c_sock_addr_html"><div class="ttname"><a href="class_c_sock_addr.html">CSockAddr</a></div><div class="ttdoc">协议地址结构体</div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00043">SockTools.h:43</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a1050e2bc438ca9b98f1662f452fc7c3b"><div class="ttname"><a href="class_c_udp_io_socket.html#a1050e2bc438ca9b98f1662f452fc7c3b">CUdpIoSocket::Swap</a></div><div class="ttdeci">virtual void Swap(CUdpIoSocket &amp;sock)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00059">UdpIoSocket.h:59</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_ae31952898329e696d6fdf9a1527746f8"><div class="ttname"><a href="class_c_udp_io_socket.html#ae31952898329e696d6fdf9a1527746f8">CUdpIoSocket::Post</a></div><div class="ttdeci">static void Post(CTcpIoClass *service, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00150">UdpIoSocket.h:150</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a005c8b65bab36ba79d725a25a2d073d0"><div class="ttname"><a href="class_c_udp_io_socket.html#a005c8b65bab36ba79d725a25a2d073d0">CUdpIoSocket::AsyncConnect</a></div><div class="ttdeci">void AsyncConnect(Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00095">UdpIoSocket.h:95</a></div></div>
<div class="ttc" id="aclass_c_udp_socket_html"><div class="ttname"><a href="class_c_udp_socket.html">CUdpSocket</a></div><div class="ttdoc">udp套接口</div><div class="ttdef"><b>Definition:</b> <a href="_udp_socket_8h_source.html#l00010">UdpSocket.h:10</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a124158838a4944182189ea67b590b509"><div class="ttname"><a href="class_c_udp_io_socket.html#a124158838a4944182189ea67b590b509">CUdpIoSocket::~CUdpIoSocket</a></div><div class="ttdeci">virtual ~CUdpIoSocket()</div><div class="ttdoc">析构函数</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00038">UdpIoSocket.h:38</a></div></div>
<div class="ttc" id="aclass_c_socket_html_a4639bf4536b44ec11a7fc37b73981c8e"><div class="ttname"><a href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">CSocket::GetService</a></div><div class="ttdeci">virtual CBasicService * GetService() const</div><div class="ttdoc">返回服务基类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8cpp_source.html#l00271">Socket.cpp:271</a></div></div>
<div class="ttc" id="aclass_c_socket_html_a816347ac8821a8288a38645702bee10e"><div class="ttname"><a href="class_c_socket.html#a816347ac8821a8288a38645702bee10e">CSocket::Swap</a></div><div class="ttdeci">virtual void Swap(CSocket &amp;sock)</div><div class="ttdoc">交换两个套接口类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8cpp_source.html#l00290">Socket.cpp:290</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a8428e3a20a7ab4e5b382053e3d58da15"><div class="ttname"><a href="class_c_udp_io_socket.html#a8428e3a20a7ab4e5b382053e3d58da15">CUdpIoSocket::AsyncRead</a></div><div class="ttdeci">void AsyncRead(const CStreamIteator &amp;buff, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00108">UdpIoSocket.h:108</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a86ed4e777424a764d7e1c2a6a83b61dc"><div class="ttname"><a href="class_c_udp_io_socket.html#a86ed4e777424a764d7e1c2a6a83b61dc">CUdpIoSocket::AsyncSendTo</a></div><div class="ttdeci">void AsyncSendTo(const CStreamIteator &amp;buff, CSockAddr *addr, const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00143">UdpIoSocket.h:143</a></div></div>
<div class="ttc" id="aclass_c_socket_html_ad08fc2df680d1fd84035f5aada97dd3a"><div class="ttname"><a href="class_c_socket.html#ad08fc2df680d1fd84035f5aada97dd3a">CSocket::SetService</a></div><div class="ttdeci">virtual void SetService(CBasicService *service)</div><div class="ttdoc">关联相应的工作类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8cpp_source.html#l00047">Socket.cpp:47</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html"><div class="ttname"><a href="class_c_udp_io_socket.html">CUdpIoSocket</a></div><div class="ttdoc">用于udp进行io投递的套接字类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00018">UdpIoSocket.h:18</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="aclass_post_handle_html"><div class="ttname"><a href="class_post_handle.html">PostHandle</a></div><div class="ttdoc">用户投递回调</div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00242">SockTools.h:242</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_aca6d749efd4b59c45d65348b7b1beb12"><div class="ttname"><a href="class_c_udp_io_socket.html#aca6d749efd4b59c45d65348b7b1beb12">CUdpIoSocket::GetIoService</a></div><div class="ttdeci">CUdpIoClass * GetIoService() const</div><div class="ttdoc">返回服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00080">UdpIoSocket.h:80</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_af5484d759ae31b550e9abb6c443660a6"><div class="ttname"><a href="class_c_udp_io_socket.html#af5484d759ae31b550e9abb6c443660a6">CUdpIoSocket::AsyncSendTo</a></div><div class="ttdeci">void AsyncSendTo(const CStreamIteator &amp;buff, CSockAddr *addr, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00137">UdpIoSocket.h:137</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_aaf3120cb54650f0fd1b32ff0348ec99c"><div class="ttname"><a href="class_c_udp_io_socket.html#aaf3120cb54650f0fd1b32ff0348ec99c">CUdpIoSocket::delete_class_copy_operator</a></div><div class="ttdeci">delete_class_copy_operator(CUdpIoSocket)</div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a52ef2a07a07c43dd0f74e3cda891c94a"><div class="ttname"><a href="class_c_udp_io_socket.html#a52ef2a07a07c43dd0f74e3cda891c94a">CUdpIoSocket::Post</a></div><div class="ttdeci">static void Post(CBasicService *service, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00163">UdpIoSocket.h:163</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a539cae0d3b3d326fa3f9a7000ed5453b"><div class="ttname"><a href="class_c_udp_io_socket.html#a539cae0d3b3d326fa3f9a7000ed5453b">CUdpIoSocket::AsyncSend</a></div><div class="ttdeci">void AsyncSend(const CStreamIteator &amp;buff, const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00130">UdpIoSocket.h:130</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a902acbf4c7fcff1856a4b9d35a20aa1a"><div class="ttname"><a href="class_c_udp_io_socket.html#a902acbf4c7fcff1856a4b9d35a20aa1a">CUdpIoSocket::CUdpIoSocket</a></div><div class="ttdeci">CUdpIoSocket(CUdpIoClass *service)</div><div class="ttdoc">构造一个udp套接字，并设置服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00034">UdpIoSocket.h:34</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_abd7e4a7189b10be6f2d8ce1876aba4e1"><div class="ttname"><a href="class_c_udp_io_socket.html#abd7e4a7189b10be6f2d8ce1876aba4e1">CUdpIoSocket::CUdpIoSocket</a></div><div class="ttdeci">CUdpIoSocket(CBasicService *service)</div><div class="ttdoc">构造一个udp io socket对象并设置内部服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00026">UdpIoSocket.h:26</a></div></div>
<div class="ttc" id="atools_8h_html_ab689500aaec0db066e3ac9483d3fe425"><div class="ttname"><a href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></div><div class="ttdeci">#define NullPtr</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00119">tools.h:119</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_ac6f4dd15dd18b78935d7f72e8d0a564e"><div class="ttname"><a href="class_c_udp_io_socket.html#ac6f4dd15dd18b78935d7f72e8d0a564e">CUdpIoSocket::AsyncRead</a></div><div class="ttdeci">void AsyncRead(const CStreamIteator &amp;buff, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00102">UdpIoSocket.h:102</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a45436d2d4df633ef17ff05f874e68ec9"><div class="ttname"><a href="class_c_udp_io_socket.html#a45436d2d4df633ef17ff05f874e68ec9">CUdpIoSocket::CUdpIoSocket</a></div><div class="ttdeci">CUdpIoSocket()</div><div class="ttdoc">构造一个udp io socket对象</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00023">UdpIoSocket.h:23</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a473ba902e85b13ae2a2fb3ec652dbc42"><div class="ttname"><a href="class_c_udp_io_socket.html#a473ba902e85b13ae2a2fb3ec652dbc42">CUdpIoSocket::AsyncRecvfrom</a></div><div class="ttdeci">void AsyncRecvfrom(const CStreamIteator &amp;buff, CSockAddr *addr, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00119">UdpIoSocket.h:119</a></div></div>
<div class="ttc" id="aclass_post_handle_null_html"><div class="ttname"><a href="class_post_handle_null.html">PostHandleNull</a></div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00255">SockTools.h:255</a></div></div>
<div class="ttc" id="aclass_c_basic_service_html"><div class="ttname"><a href="class_c_basic_service.html">CBasicService</a></div><div class="ttdoc">服务类 基类</div><div class="ttdef"><b>Definition:</b> <a href="_service_base_8h_source.html#l00015">ServiceBase.h:15</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_acae8d9bce3697d423126f750fa647902"><div class="ttname"><a href="class_c_udp_io_socket.html#acae8d9bce3697d423126f750fa647902">CUdpIoSocket::AsyncConnect</a></div><div class="ttdeci">void AsyncConnect(Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00089">UdpIoSocket.h:89</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a4101da7fdef4bdf4fbebe9c1a6372aba"><div class="ttname"><a href="class_c_udp_io_socket.html#a4101da7fdef4bdf4fbebe9c1a6372aba">CUdpIoSocket::Post</a></div><div class="ttdeci">static void Post(CTcpIoClass *service, const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00156">UdpIoSocket.h:156</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_ad8d8a76ec387df035ac135d719848eee"><div class="ttname"><a href="class_c_udp_io_socket.html#ad8d8a76ec387df035ac135d719848eee">CUdpIoSocket::AsyncRecvfrom</a></div><div class="ttdeci">void AsyncRecvfrom(const CStreamIteator &amp;buff, CSockAddr *addr, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00115">UdpIoSocket.h:115</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html_a6bd9186855643f5b2414e073d938d01e"><div class="ttname"><a href="class_c_udp_io_socket.html#a6bd9186855643f5b2414e073d938d01e">CUdpIoSocket::Post</a></div><div class="ttdeci">static void Post(CBasicService *service, const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00169">UdpIoSocket.h:169</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
